﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年1月7日
//类描述：实体类 PermUserWeb (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年1月7日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.Rights.Model
{
    /// <summary>
    /// 实体类 PermUserWeb (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "PermUserWeb", PrimaryKey = "GID", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class PermUserWebInfo : BaseModel
    {
        public PermUserWebInfo()
        {            
            PrimaryKey = "GID"; 
			Fields.Add("GID");//GID
			Fields.Add("UID");//UID
			Fields.Add("HostName");//HostName
			Fields.Add("LastEditBy");//LastEditBy
			Fields.Add("LastEditDate");//LastEditDate
			
			this.OnCreated();			
			this.OnModelCreated();
        }
		public PermUserWebInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
        }
        #endregion 
		
		#region 成员变量
				
		private Guid _GID;//GID
		private string _UID;//UID
		private string _HostName;//HostName
		private string _LastEditBy;//LastEditBy
		private DateTime? _LastEditDate;//LastEditDate
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// GID
        /// </summary>       
		[ModelField(Description = "GID", Type = typeof(Guid), ErrorMessage = "GID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 16,  DbType = "uniqueidentifier", IsNeedRecordModify = true)]
        public virtual Guid GID
        {
            get
            {
                return this._GID;
            }
            set
            {
                if (_GID != value || (_GID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("PermUserWeb", "GID", _GID, value, "uniqueidentifier", "GID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnGIDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._GID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnGIDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _GID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// UID
        /// </summary>       
		[ModelField(Description = "UID", Type = typeof(string), ErrorMessage = "UID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string UID
        {
            get
            {
                return this._UID;
            }
            set
            {
                if (_UID != value || (_UID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("PermUserWeb", "UID", _UID, value, "nvarchar", "UID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnUIDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._UID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnUIDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _UID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// HostName
        /// </summary>       
		[ModelField(Description = "HostName", Type = typeof(string), ErrorMessage = "HostName信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 500,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string HostName
        {
            get
            {
                return this._HostName;
            }
            set
            {
                if (_HostName != value || (_HostName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("PermUserWeb", "HostName", _HostName, value, "nvarchar", "HostName");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnHostNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._HostName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnHostNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _HostName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// LastEditBy
        /// </summary>       
		[ModelField(Description = "LastEditBy", Type = typeof(string), ErrorMessage = "LastEditBy信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string LastEditBy
        {
            get
            {
                return this._LastEditBy;
            }
            set
            {
                if (_LastEditBy != value || (_LastEditBy == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("PermUserWeb", "LastEditBy", _LastEditBy, value, "varchar", "LastEditBy");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnLastEditByChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._LastEditBy = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnLastEditByChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _LastEditBy = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// LastEditDate
        /// </summary>       
		[ModelField(Description = "LastEditDate", Type = typeof(DateTime?), ErrorMessage = "LastEditDate信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? LastEditDate
        {
            get
            {
                return this._LastEditDate;
            }
            set
            {
                if (_LastEditDate != value || (_LastEditDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("PermUserWeb", "LastEditDate", _LastEditDate, value, "datetime", "LastEditDate");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnLastEditDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._LastEditDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnLastEditDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _LastEditDate = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnGIDChanging(ModifyInfo modifyInfo);//GIDGID改变之前发生
        partial void OnGIDChanged(ModifyInfo modifyInfo);//GIDGID改变之后发生
		partial void OnUIDChanging(ModifyInfo modifyInfo);//UIDUID改变之前发生
        partial void OnUIDChanged(ModifyInfo modifyInfo);//UIDUID改变之后发生
		partial void OnHostNameChanging(ModifyInfo modifyInfo);//HostNameHostName改变之前发生
        partial void OnHostNameChanged(ModifyInfo modifyInfo);//HostNameHostName改变之后发生
		partial void OnLastEditByChanging(ModifyInfo modifyInfo);//LastEditByLastEditBy改变之前发生
        partial void OnLastEditByChanged(ModifyInfo modifyInfo);//LastEditByLastEditBy改变之后发生
		partial void OnLastEditDateChanging(ModifyInfo modifyInfo);//LastEditDateLastEditDate改变之前发生
        partial void OnLastEditDateChanged(ModifyInfo modifyInfo);//LastEditDateLastEditDate改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("PermUserWeb", "GID", GID);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("PermUserWeb", "GID", GID);		
			ManageEditURI = ZModel.InitMEditURI("PermUserWeb", "GID", GID);	
		 	ManageDetailURI = ZModel.InitMDetailURI("PermUserWeb", "GID", GID);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}